<!doctype html> 
<html> 
<head> 
    <meta charset="utf-8"> 
    <title></title>
    <script type="text/javascript" src='jquery-1.9.1.min.js'></script> 
    <style type="text/css">
*{margin: 0;padding: 0;}
body,html{height: 100%;}
div{
	width:100px;height: 100px;background: black;display: block;

}

    </style>
</head>
<body>
<div></div>
<div></div>
<div></div>
<script type="text/javascript">
	



	function $(dom){
		return new Jquery(dom);
	};

	function Jquery(dom){
		//alert(dom)
		this.arr = [];
		switch(dom.charAt(0)){
			case '.' :
			alert('类选择')
			break;
			case '#' :
			alert('id选择')
			break;
			default:
			alert('标签')
			break;
		}
	}

	$('#div');

</script>
</body>
</html>